<?php

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => SITE_NAME,
    'language' => 'en',
    'theme' => THEME,
    'theme' => 'admin',
    'import' => array(
        'application.models.base.*',
        'ext.*',
        'ext.core.*',
        'ext.mail.YiiMailMessage',
        'application.helpers.*',
    ),
    'modules' => array(
        'user',
        'menu',
        'invoice'
    ),
    // application components
    'components' => array(
        'user' => array(
            'class' => 'ext.core.auth.WebUser',
            // enable cookie-based authentication
            'allowAutoLogin' => false,
            'loginUrl' => array('/user/login'),
        ),
        'mail' => array(
            'class' => 'ext.mail.YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.gmail.com',
                'username' => 'no-reply@eswebsoft.com',
                'password' => 'eswebsoft.com',
                'port' => '465',
                'encryption' => 'ssl',
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),
//        'authManager' => array(
//            'class' => 'application.modules.srbac.components.SDbAuthManager',
//            'connectionID' => 'db',
//            'itemTable' => 'auth_item',
//            'assignmentTable' => 'auth_assignment',
//            'itemChildTable' => 'auth_item_child',
//        ),
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'rules' => array(
//                '/' => 'site/index', lam cai nay phai hieu
            ),
        ),
        'errorHandler' => array(
            'errorAction' => 'site/error',
        ),
        'cache' => array(
            'class' => 'system.caching.CFileCache',
        ),
        'log' => array(
            'class' => 'CLogRouter',
        ),
        'image'=>array(
            'class'=>'application.extensions.image.CImageComponent',
            'driver' => 'GD',
            'params'=>array('directory'=>dirname(Yii::getPathOfAlias('webroot')) . "/uploads/images/products/" ),
        ),
        'session' => array(
            'class' => 'CDbHttpSession',
            'timeout' => 86400,
        )
    ),
    'params' => array(
        'caching_time' => 0
    ),
//    'defaultController' => 'menus/admin',
     
);